(function (root, factory) {
    //环境检测
    if (typeof define === 'function' && define.amd) {
        define([], factory);
    } else if (typeof exports === 'object') {
        module.exports = factory();
    } else {
        root.returnExports = factory();
    }
}(this, function () {
   //模块检测
    var sum = function (x, y) {
        return x + y;
    }
    var sub = function (x, y) {
        return x - y;
    }
    var math = {
        findSum: function (a, b) {
            return sum(a, b);
        },
        findSub: function (a, b) {
            return sub(a, b);
        }
    }
    return math;
}));